<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://www.ccut.edu.cn/saturn" prefix="saturn"%>

<%@page import="java.util.Properties"%>
<%@page import="java.util.Calendar"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Locale"%>
<%@page import="com.sun.corba.se.spi.activation.Server"%>
<%@page import="edu.ccut.saturn.component.DatabaseManager"%>
<html>
<head>
<%@ include file="/jsp/include/header/meta.jsp"%>
<%@ include file="/jsp/include/header/javascript.jsp"%>
<%@ include file="/jsp/include/header/stylesheettag.jsp"%>

<title>system信息</title>
</head>
<body>
<% 
	Runtime rt = Runtime.getRuntime();
	String total = String.valueOf(rt.totalMemory());
	String free = String.valueOf(rt.freeMemory());
	String used = String.valueOf(rt.totalMemory()-rt.freeMemory());
	Properties p = System.getProperties();
	Calendar cl = Calendar.getInstance();
	SimpleDateFormat df = new SimpleDateFormat("yyyy年MM月dd日 hh时mm分ss秒 E",Locale.CHINA);
	String date = df.format(cl.getTime());
	Locale locale = Locale.getDefault();
 %>
<saturn:formBeans name="componentQueryForm" title="System Info"
	method="post">
	<saturn:formBean label="System Date" name="System_Date" type="text"
		id="System_Date" value="<%=date%>" size="5000px" readonly="readonly"/>
	<saturn:formBeanLine />
	<saturn:formBean label="Java Version" name="version" type="text"
		id="version" value="<%=p.get("java.version").toString()%>" readonly="readonly" />
	<saturn:formBeanLine />
	<saturn:formBean label="Java Vendor" name="name" type="text" id="name"
		value="<%=p.get("java.vendor").toString()%>" readonly="readonly"/>
	<saturn:formBeanLine />
	<saturn:formBean label="JVM Version" name="name" type="text" id="name"
		value="<%=p.get("java.vm.specification.version").toString()%>" readonly="readonly"/>
	<saturn:formBeanLine />
	<saturn:formBean label="JVM Vendor" name="name" type="text" id="name"
		value="<%=p.get("java.vm.vendor").toString()%>" readonly="readonly"/>
	<saturn:formBeanLine />
	<saturn:formBean label="JVM Implementation Version" name="name"
		type="text" id="name" value="<%=p.get("java.vm.version").toString()%>" readonly="readonly"/>
	<saturn:formBeanLine />
	<saturn:formBean label="Java Runtime" name="name" type="text" id="name"
		value="<%=p.get("java.runtime.name").toString()%>" readonly="readonly"/>
	<saturn:formBeanLine />
	<saturn:formBean label="Java VM" name="name" type="text" id="name"
		value="<%=p.get("java.vm.name").toString()%>" readonly="readonly"/>
	<saturn:formBeanLine />
	<saturn:formBean label="User Timezone" name="name" type="text" id="name"
		value="<%=p.get("user.timezone").toString()%>" readonly="readonly"/>
	<saturn:formBeanLine />
	<saturn:formBean label="User Locale" name="name" type="text" id="name"
		value="<%=locale.getDisplayName()%>" readonly="readonly"/>
	<saturn:formBeanLine />
	<saturn:formBean label="System Encoding" name="name" type="text"
		id="name" value="<%=p.get("file.encoding").toString()%>" readonly="readonly"/>
	<saturn:formBeanLine />
	<saturn:formBean label="Operating System" name="name" type="text"
		id="name" value="<%=p.get("os.name").toString()%>" readonly="readonly"/>
	<saturn:formBeanLine />
	<saturn:formBean label="OS Architecture" name="name" type="text"
		id="name" value="<%=p.get("os.arch").toString()%>" readonly="readonly"/>
	<saturn:formBeanLine />
	<saturn:formBean label="Application Server Container" name="name"
		type="text" id="name"
		value="<%=getServletConfig().getServletContext().getServerInfo()%>" readonly="readonly"/>
</saturn:formBeans>
<saturn:formBeans name="componentQueryForm"
	title="Java VM Memory Statistics"
	action="${pageContext.request.contextPath}/saturnManager::/bundleModule/action/FuzzyQueryBundlesInfoAction.action"
	method="post">
	<saturn:formBean label="Total Memory" name="Total" type="text"
		id="Total" value="<%=total%>" readonly="readonly"/>
	<saturn:formBeanLine />
	<saturn:formBean label="Free Memory" name="Free" type="text" id="Free"
		value="<%=free%>" readonly="readonly"/>
	<saturn:formBeanLine />
	<saturn:formBean label="Used Memory" name="Used" type="text" id="Used"
		value="<%=used%>" readonly="readonly"/>
	<saturn:formBeanLine />
	<saturn:formBean label="Memory Graph" name="Graph" type="text"
		id="Graph" value="" readonly="readonly"/>

</saturn:formBeans>
</body>
</html>